<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="./react/react.development.js"></script>
  <script src="./react/react-dom.development.js"></script>
  <script src="./react/babel.min.js"></script>

  <div id="app"></div>

  <script type="text/babel">
    class App extends React.Component {
      constructor(){
        super()
        this.state = {
          movies: ['one', 'two', 'three']
        }
      }
      render(){
        return (
          <div>
            <ul>
              {
                this.state.movies.map((item, index) => {
                  return <li onClick={(e)=>{this.liClick(item,index,e)}}>{item}</li>
                })
              }
            </ul>
          </div>
        )
      }
      liClick(item,index,e){
        console.log(item,index,e)
      }
    }
    ReactDOM.render(<App/>, document.getElementById("app"))
  </script>
</body>

</html>